package cn.sjx.graduate.util;

import cn.sjx.graduate.exception.BusinessException;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;

/**
 * @Author: bo-feifei
 * @Date 2021/11/1 15:39
 * @Version 1.0
 */
public class AssertUtil {
    private AssertUtil() {}

    /**
     * 判断传进来的内容是否为空，如果为空，就报错并将报错信息上报
     * @param judge
     * @param message
     */
    public static void hasText(String judge,String message) {
        if (StringUtils.isBlank(judge)) {
            throw new BusinessException(message);
        }
    }

}
